using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Minimum Bounding Geometry</para>
    /// <para>Creates a feature class containing polygons which represent a specified minimum bounding geometry enclosing each input feature or each group of input features.</para>
    /// <para>创建一个包含面的要素类，这些面表示包含包含每个输入要素或每组输入要素的指定最小边界几何。</para>
    /// </summary>    
    [DisplayName("Minimum Bounding Geometry")]
    public class MinimumBoundingGeometry : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MinimumBoundingGeometry()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input features that can be point, multipoint, line, polygon, or multipatch.</para>
        /// <para>输入要素可以是点、多点、线、面或多面体。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class.</para>
        /// <para>输出面要素类。</para>
        /// </param>
        public MinimumBoundingGeometry(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Minimum Bounding Geometry";

        public override string CallName => "management.MinimumBoundingGeometry";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _geometry_type.GetGPValue(), _group_option.GetGPValue(), _group_field, _mbg_fields_option.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features that can be point, multipoint, line, polygon, or multipatch.</para>
        /// <para>输入要素可以是点、多点、线、面或多面体。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class.</para>
        /// <para>输出面要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Geometry Type</para>
        /// <para><xdoc>
        ///   <para>Specifies what type of minimum bounding geometry the output polygons will represent.</para>
        ///   <bulletList>
        ///     <bullet_item>Rectangle by area—The rectangle of the smallest area enclosing an input feature. This is the default.</bullet_item><para/>
        ///     <bullet_item>Rectangle by width—The rectangle of the smallest width enclosing an input feature.</bullet_item><para/>
        ///     <bullet_item>Convex hull—The smallest convex polygon enclosing an input feature.</bullet_item><para/>
        ///     <bullet_item>Circle—The smallest circle enclosing an input feature envelope.</bullet_item><para/>
        ///     <bullet_item>Envelope—The of an input feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出面将表示的最小边界几何体类型。</para>
        ///   <bulletList>
        ///     <bullet_item>按面积划分的矩形 - 包围输入要素的最小区域的矩形。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>按宽度划分的矩形 - 包围输入要素的最小宽度的矩形。</bullet_item><para/>
        ///     <bullet_item>凸包 - 包围输入要素的最小凸面。</bullet_item><para/>
        ///     <bullet_item>圆 - 包围输入特征包络的最小圆。</bullet_item><para/>
        ///     <bullet_item>包络 （Envelope） - 输入要素的包络。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geometry Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _geometry_type_value _geometry_type { get; set; } = _geometry_type_value._RECTANGLE_BY_AREA;

        public enum _geometry_type_value
        {
            /// <summary>
            /// <para>Rectangle by area</para>
            /// <para>Rectangle by area—The rectangle of the smallest area enclosing an input feature. This is the default.</para>
            /// <para>按面积划分的矩形 - 包围输入要素的最小区域的矩形。这是默认设置。</para>
            /// </summary>
            [Description("Rectangle by area")]
            [GPEnumValue("RECTANGLE_BY_AREA")]
            _RECTANGLE_BY_AREA,

            /// <summary>
            /// <para>Rectangle by width</para>
            /// <para>Rectangle by width—The rectangle of the smallest width enclosing an input feature.</para>
            /// <para>按宽度划分的矩形 - 包围输入要素的最小宽度的矩形。</para>
            /// </summary>
            [Description("Rectangle by width")]
            [GPEnumValue("RECTANGLE_BY_WIDTH")]
            _RECTANGLE_BY_WIDTH,

            /// <summary>
            /// <para>Convex hull</para>
            /// <para>Convex hull—The smallest convex polygon enclosing an input feature.</para>
            /// <para>凸包 - 包围输入要素的最小凸面。</para>
            /// </summary>
            [Description("Convex hull")]
            [GPEnumValue("CONVEX_HULL")]
            _CONVEX_HULL,

            /// <summary>
            /// <para>Circle</para>
            /// <para>Circle—The smallest circle enclosing an input feature envelope.</para>
            /// <para>圆 - 包围输入特征包络的最小圆。</para>
            /// </summary>
            [Description("Circle")]
            [GPEnumValue("CIRCLE")]
            _CIRCLE,

            /// <summary>
            /// <para>Envelope</para>
            /// <para>Envelope—The of an input feature.</para>
            /// <para>包络 （Envelope） - 输入要素的包络。</para>
            /// </summary>
            [Description("Envelope")]
            [GPEnumValue("ENVELOPE")]
            _ENVELOPE,

        }

        /// <summary>
        /// <para>Group Option</para>
        /// <para><xdoc>
        ///   <para>Specifies how the input features will be grouped; each group will be enclosed with one output polygon.</para>
        ///   <bulletList>
        ///     <bullet_item>None—Input features will not be grouped. This is the default. This option is not available for point input.</bullet_item><para/>
        ///     <bullet_item>All—All input features will be treated as one group.</bullet_item><para/>
        ///     <bullet_item>List—Input features will be grouped based on their common values in the specified field or fields in the group field parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何对输入要素进行分组;每个组将用一个输出多边形封闭。</para>
        ///   <bulletList>
        ///     <bullet_item>无—不会对输入要素进行分组。这是默认设置。此选项不适用于点输入。</bullet_item><para/>
        ///     <bullet_item>全部—所有输入要素将被视为一个组。</bullet_item><para/>
        ///     <bullet_item>列表 - 输入要素将根据其在指定字段中的通用值或组字段参数中的字段进行分组。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Group Option")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _group_option_value _group_option { get; set; } = _group_option_value._NONE;

        public enum _group_option_value
        {
            /// <summary>
            /// <para>None</para>
            /// <para>None—Input features will not be grouped. This is the default. This option is not available for point input.</para>
            /// <para>无—不会对输入要素进行分组。这是默认设置。此选项不适用于点输入。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>All</para>
            /// <para>All—All input features will be treated as one group.</para>
            /// <para>全部—所有输入要素将被视为一个组。</para>
            /// </summary>
            [Description("All")]
            [GPEnumValue("ALL")]
            _ALL,

            /// <summary>
            /// <para>List</para>
            /// <para>List—Input features will be grouped based on their common values in the specified field or fields in the group field parameter.</para>
            /// <para>列表 - 输入要素将根据其在指定字段中的通用值或组字段参数中的字段进行分组。</para>
            /// </summary>
            [Description("List")]
            [GPEnumValue("LIST")]
            _LIST,

        }

        /// <summary>
        /// <para>Group Field(s)</para>
        /// <para>The field or fields in the input features that will be used to group features, when List is specified as Group Option. At least one group field is required for List option. All features that have the same value in the specified field or fields will be treated as a group.</para>
        /// <para>当“列表”指定为“组选项”时，输入要素中将用于对要素进行分组的一个或多个字段。“列表”选项至少需要一个组字段。在指定字段中具有相同值的所有要素都将被视为一个组。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Group Field(s)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _group_field { get; set; } = null;


        /// <summary>
        /// <para>Add geometry characteristics as attributes to output</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to add the geometric attributes in the output feature class or omit them in the output feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Omits the geometric attributes in the output feature class. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Adds the geometric attributes in the output feature class.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是在输出要素类中添加几何属性还是在输出要素类中省略几何属性。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 省略输出要素类中的几何属性。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 在输出要素类中添加几何属性。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Add geometry characteristics as attributes to output")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _mbg_fields_option_value _mbg_fields_option { get; set; } = _mbg_fields_option_value._false;

        public enum _mbg_fields_option_value
        {
            /// <summary>
            /// <para>MBG_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MBG_FIELDS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_MBG_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_MBG_FIELDS")]
            [GPEnumValue("false")]
            _false,

        }

        public MinimumBoundingGeometry SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}